package com.hxzy.service.impl;

import com.hxzy.entity.Area;
import com.hxzy.mapper.AreaMapper;
import com.hxzy.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 类说明
 *
 * @author admin
 * @date 2021-09-16
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class AreaServiceImpl extends CommonServiceImpl<Area, Long> implements AreaService {

    private AreaMapper areaMapper;

    @Autowired
    public void setAreaMapper(AreaMapper areaMapper) {
        this.areaMapper = areaMapper;
        super.setMyBatisBaseDao(areaMapper);
    }

    @Override
    public List<Area> findByParentId(Long parentId) {
        return this.areaMapper.findByParentId(parentId);
    }
}
